import requerts from "./requerts";
import {startLoad} from "./loginFunctions";
function beforeRequerts(data){
    startLoad();
    return requerts(data);
}

//登录
export const login = (data) =>beforeRequerts({url: 'login',method: 'POST',data:data});
export const changePassword = (data) =>beforeRequerts({url: 'api/changePassword',method: 'POST',data:data});
export const selectStationByEquipment = (params) =>beforeRequerts({url: 'api/selectStationByEquipment',method: 'GET',params:params});
export const selectNameByNum = (params) =>beforeRequerts({url: 'api/selectNameByNum',method: 'GET',params:params});
export const selectSSByS = (params) =>beforeRequerts({url: 'api/selectSSByS',method: 'GET',params:params});
export const selectLaborins = (params) =>beforeRequerts({url: 'api/selectLaborins',method: 'GET',params:params});
export const changeLaborinsToday = (data) =>beforeRequerts({url:'api/changeLaborinsToday',method: 'POST',data:data});


//人员管理
export const addPeople = (data) =>beforeRequerts({url:'api/addPeople',method: 'POST',data:data});
export const selectPeople = (params) =>beforeRequerts({url:'api/selectPeople',method: 'GET',params:params});
export const selectClass = (params) =>beforeRequerts({url:'api/selectClass',method: 'GET',params:params});
export const selectPosition = (params) =>beforeRequerts({url:'api/selectPosition',method: 'GET',params:params});
export const updatePeople = (data) =>beforeRequerts({url:'api/updatePeople',method: 'POST',data:data});
export const delectPeople = (data) =>beforeRequerts({url:'api/delectPeople',method: 'POST',data:data});



//权限
export const allowClassAdd = (data) =>beforeRequerts({url:'api/allowClassAdd',method: 'POST',data:data});
export const selectClassState = (params) =>beforeRequerts({url:'api/selectClassState',method: 'GET',params:params});
export const changeLaborinsDay = (data) =>beforeRequerts({url:'api/changeLaborinsDay',method: 'POST',data:data});

//劳保用品表
export const selectLabor = (params) =>beforeRequerts({url:'api/selectLabor',method: 'GET',params:params});
export const insertLabor = (data) =>beforeRequerts({url:'api/insertLabor',method: 'POST',data:data});

//低压电工
export const selectSpecialDY = (params) =>beforeRequerts({url:'api/selectSpecialDY',method: 'GET',params:params});

//登高
export const selectSpecialDG = (params) =>beforeRequerts({url:'api/selectSpecialDG',method: 'GET',params:params});

//查询工班谁没填表
export const selectIsInfo = (params) =>beforeRequerts({url:'api/selectIsInfo',method: 'GET',params:params});
//查询现在有哪些表
export const selectAllTables = (params) =>beforeRequerts({url:'api/selectAllTables',method: 'GET',params:params});

//配置数据相关接口
export const savePrescription = (data) =>beforeRequerts({url:'api/savePrescription',method: 'POST',data:data});
export const selectPrescription = (params) =>beforeRequerts({url:'api/selectPrescription',method: 'GET',params:params});

// import {reqCategoryList} from '@/api'
// reqCategoryList();

// 添加证书表
export const insertS = (data) =>beforeRequerts({url:'api/insertS',method: 'POST',data:data});


